hi carl, To validate the asp.net controls dynamically you can use the above code: RequiredFieldValidator required = new RequiredFieldValidator(); //create object required.ControlToValidate = "RadioButtonList1; //bind control required.ErrorMessage = "Choose option"; //specify message this.form1.Controls.Add(required); // add the control
Liked By
Write Answer
Validate ASP.NET Controls
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Chris Anderson
30-Nov-2011To validate the asp.net controls dynamically you can use the above code:
RequiredFieldValidator required = new RequiredFieldValidator(); //create object
required.ControlToValidate = "RadioButtonList1; //bind control
required.ErrorMessage = "Choose option"; //specify message
this.form1.Controls.Add(required); // add the control